import request from '@/utils/request'

const URL = 'op/notice'

export function addNotice(data) {
  return request({
    url: URL + '/add',
    method: 'post',
    data: data
  })
}

export function delNotice(data) {
  return request({
    url: URL + '/delete',
    method: 'post',
    data: {
      orderId: data
    }
  })
}

export function cancelNotice(id) {
  return request({
    url: URL + '/cancel',
    method: 'post',
    data: {
      orderId: id
    }
  })
}

export function updateNotice(data) {
  return request({
    url: URL + '/update',
    method: 'post',
    data: data
  })
}

export function getNoticeByUserId(data) {
  return request({
    url: URL + '/user/'+data,
    method: 'post',
    data: {
    }
  })
}


export function getNoticeById(data) {
  return request({
    url: URL + '/'+data,
    method: 'post',
    data: {

    }
  })
}

export function getAllNotice() {
  return request({
    url: URL ,
    method: 'post',
  })
}

export function getNoticeCount() {
  return request({
    url: URL + '/count',
    method: 'post',
  })
}
